package com.eastfair.builder;

import com.eastfair.builder.dto.ReportSpaceDTO;
import com.eastfair.builder.entity.ReportSpace;
import com.eastfair.core.base.R;
import com.eastfair.home.dto.ReportSpaceAuditDTO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * 报馆 Feign.
 *
 * @author dqq
 * @date 2022 /8/10
 */
@FeignClient(value = "builder/reportSpace")
public interface ReportSpaceFeign {

    /**
     * 展商ID查询报馆记录.
     *
     * @param exhibitorId the exhibitor id
     * @return the by exhibitor id
     */
    @GetMapping("/get/exhibitor/{exhibitorId}")
    R<ReportSpace> getByExhibitorId(@PathVariable("exhibitorId") Long exhibitorId);

    /**
     * 更新报馆审核状态.
     *
     * @param reportSpaceDTO the report space dto
     * @return the r
     */
    @PostMapping("/update/auditStatus")
    R<Boolean> updateAuditStatus(@RequestBody ReportSpaceDTO reportSpaceDTO);

    /**
     * 更新场馆审核状态.
     *
     * @param reportSpaceDTO the report space dto
     * @return the r
     */
    @PostMapping("/update/venue/auditStatus")
    R<Boolean> updateVenueAuditStatus(@RequestBody ReportSpaceDTO reportSpaceDTO);


    /**
     * 发送图纸审核通过信息
     *
     * @param reportSpaceId the report space id
     * @return the r
     */
    @Deprecated
    @GetMapping("/send/drawingAudit/msg/{reportSpaceId}")
    R<Boolean> sendDrawingAuditMsg(@PathVariable("reportSpaceId") Long reportSpaceId);

    /**
     * 发送图纸审核通过信息
     *
     * @param reportSpaceAuditDTO the report space audit dto
     * @return the r
     */
    @PostMapping("/send/drawingAudit/msg")
    R<Boolean> sendDrawingAuditMsg(@RequestBody ReportSpaceAuditDTO reportSpaceAuditDTO);
}